$(function(){
																/*首页焦点图*/
	if($("#slide").length){
		var iSlideLiLength=$("#slide>ul>li").length,
			iSlideLiWidth=$("#slide>ul>li").width(),
			iSlideUlWidth=iSlideLiWidth*iSlideLiLength*2,
			iSlideNumber=0;
		$("#slide>ul").width(iSlideUlWidth);
		$("#slide>ul").append($("#slide>ul").html());
		function fnSlideNext(){
			if(!($("#slide>ul")).is(":animated")){
				if(iSlideNumber>=iSlideLiLength){
					$("#slide>ul").css({"marginLeft":"0"});
					iSlideNumber=0;
				}
				$("#slide>ul").animate({"marginLeft":"-=980"},1000,function(){
					iSlideNumber++;
				});
			}
		}
		function fnSlideBack(){
			if(!($("#slide>ul")).is(":animated")){
				if(iSlideNumber<=0){
					$("#slide>ul").css({"marginLeft":-iSlideLiWidth*iSlideLiLength});
					iSlideNumber=iSlideLiLength;
				}
				$("#slide>ul").animate({"marginLeft":"+=980"},1000,function(){
					iSlideNumber--;
				});
			}
		}
		$("#slideBack").click(fnSlideBack);
		$("#slideNext").click(fnSlideNext);
		setInterval(fnSlideNext,5000);
	}
																/*首页学员滚动*/
	if($("#enrollGd").length){
		var iEnrollConHeight=$("#enrollGd>ul").height(),
			iEnrollConTime,
			iEnrollConSpeed=50;	
		$("#enrollGd>ul").append($("#enrollGd>ul").html());
		function fnEnrollConGd(){
			if(parseInt($("#enrollGd>ul").css("margin-top"))>-iEnrollConHeight){
				$("#enrollGd>ul").css("margin-top","-=1")
			}else{
				$("#enrollGd>ul").css("margin-top","0")
			}
		}
		iEnrollConTime=setInterval(fnEnrollConGd,iEnrollConSpeed);
		$("#enrollGd>ul").hover(function(){
			clearTimeout(iEnrollConTime)
		},function(){
			iEnrollConTime=setInterval(fnEnrollConGd,iEnrollConSpeed);
		})
	}
																/*学校选择*/
	if($("#schoolGdd").length){
		$('#schoolGdd').kxbdSuperMarquee({
			distance:57,
			time:3,
			direction:'up',
			isAuto:false,
			btnGo:{up:'#schoolGddBack',down:'#schoolGddNext'}
		});
		$.tab({
			oTab:"#schoolGdd ul",					//tab选项卡的容器（父级）
			sTabChildren:"li",				//tab选项卡
			oTabMain:"#xx",					//tab内容区的容器（父级）
			sTabMainChildren:"dd",			//tab内容区
			sEarliest:false,				//是否执行初始化显示
			sClass:"current",				//选中样式
			sEvent:"click",					//tab选项卡切换的触发事件
			fnAdditional:function(){
				var o=this;
				$(o.oTab).children(o.sTabChildren).bind(o.sEvent,function(){
					var _index=$(this).index(),
						_length=$(o.oTab).children(o.sTabChildren).length/2;
					if(_length>8){
						if(_index<_length){
							$(o.oTab).children(o.sTabChildren).eq(_index+_length).addClass("current");
						}else{
							$(o.oTab).children(o.sTabChildren).eq(_index-_length).addClass("current");
						}
					}
				});
			}
		});
	}
																/*首页自考院校滚动*/
	if($("#schoolGd").length){
		$('#schoolGd').kxbdSuperMarquee({
			distance:166,
			time:3,
			direction:'left',
			btnGo:{left:'#schoolGdNext',right:'#schoolGdBack'}
		});
	}
																/*首页证书展示滚动*/
	if($("#certificateGd").length){
		$('#certificateGd').kxbdSuperMarquee({
			distance:248,
			time:5,
			direction:'left',
			btnGo:{left:'#certificateGdNext',right:'#certificateGdBack'}
		});
	}
																/*首页技能考证滚动*/
	if($("#examGd").length){
		$('#examGd').kxbdSuperMarquee({
			distance:62,
			time:3,
			direction:'up',
			btnGo:{up:'#examGdBack',down:'#examGdNext'}
		});
	}
																/*内页新闻tab*/
	if($("#newsTab").length){
		$.tab({
			oTab:"#newsTab .tab",					//tab选项卡的容器（父级）
			sTabChildren:"a",				//tab选项卡
			oTabMain:"#newsTab",			//tab内容区的容器（父级）
			sTabMainChildren:"dl",			//tab内容区
			sClass:"current",				//选中样式
			sEvent:"click",					//tab选项卡切换的触发事件
			sEarliest:true					//是否执行初始化显示
		});
	}
});